package com.lucky.ebidding.interceptor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * ClassName:Webconfig
 * Package:lxx.ligenote.interceptor
 * Description:
 *
 * @Date:2019/12/22 15:30
 * @Author:857251389@qq.com
 */
@Configuration
public class Webconfig implements WebMvcConfigurer {
    @Autowired
    private SessionInterceptor sessionInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(sessionInterceptor).addPathPatterns("/**")
                .excludePathPatterns("/show/**")
                .excludePathPatterns("/css/**","/js/**","/image/**","/layui/**")
                .excludePathPatterns("/login","/loginJump");
    }
}
